package cn.zjjd.wlproject.hhx.demo.service;

import cn.zjjd.wlproject.hhx.demo.mapper.StudentMapper;
import cn.zjjd.wlproject.hhx.demo.pojo.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StudentService {
    @Autowired
    StudentMapper studentMapper;

    public List<Student> queryStudentList(){
        return studentMapper.queryStudentList();
    }
    public Student queryStudentByNumber(int number){
        return studentMapper.queryStudentByNumber(number);
    }
    public int addStudent(Student student){
        return studentMapper.addStudent(student);
    }
    public int updateStudent(Student student){
        return studentMapper.updateStudent(student);
    }
    public int deleteStudent(int id){
        return studentMapper.deleteStudent(id);
    }
}
